package top.lfyao.designpattern.details.flyweight;

/**
 * 所有具体享元类的超类，接受并作用于外部状态
 */
public abstract class FlyWeight {
    public abstract void operation(int extrinsictate);
}

class ConcreteFlyWeight extends FlyWeight {

    @Override
    public void operation(int extrinsictate) {
        System.out.println("具体FlyWeight"+extrinsictate);
    }
}

class UnshareConcreteFlyWeight extends FlyWeight {

    @Override
    public void operation(int extrinsictate) {
        System.out.println("不共享的具体FlyWeight:"+extrinsictate);
    }
}
